﻿$(function () {
    loadTables();
});

function loadTables() {
    $("#tableBody").html("");
    $.ajax({
        type: "GET",
        url: "/Ywlb/GetAllList?_t=" + new Date().getTime(),
        success: function (data) {
            $.each(data, function (i, item) {              
                var tr = "<a href='/YWLB/Yw?ywlbID=" + item.id + "' class='weui-media-box weui-media-box_appmsg'>" +
                    "<div class='weui-media-box__hd'>" +
                        "<img class='weui-media-box__thumb' src='/UploadFiles/" + item.picPath + "' alt=''>" +
                    "</div>" +
                    "<div class='weui-media-box__bd'>" +
                       " <h4 class='weui-media-box__title'>" + item.name + "</h4>" +
                        "<p class='weui-media-box__desc'>" + item.remarks + "</p></div></a>";

                $("#tableBody").append(tr);
            })

        }
    })
};